//
//  ViewController.m
//  wangzhe
//
//  Created by 李 佳伟 on 2017/10/9.
//  Copyright © 2017年 李 佳伟. All rights reserved.
//

#import "ViewController.h"
#import "JTCSM.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    CGRect rect = [df labelHeightWithContent:@"测试数据五" width:200 font:20];
    self.myItemlabel = [UILabel initWithFrame:CGRectMake(0, 0, rect.size.width, 40) text:self.nameTitle font:20 textAlignment:NSTextAlignmentCenter texcolor:[UIColor blackColor] backgroundColor:[UIColor clearColor]];
    [self.navigationItem setTitleView:self.myItemlabel];
    [JTCSMSingle shareSingle].navigationC = self.navigationController;
}
    //找到导航栏最下面黑线视图
- (UIImageView *)getLineViewInNavigationBar:(UIView *)view
{
    if ([view isKindOfClass:UIImageView.class] && view.bounds.size.height <= 1.0) {
        return (UIImageView *)view;
    }
    for (UIView *subview in view.subviews) {
        UIImageView *imageView = [self getLineViewInNavigationBar:subview];
        if (imageView) {
            return imageView;
        }
    }
    
    return nil;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
